package cn.wgoodq.study.MultiThreading.exercise;

import cn.wgoodq.study.MultiThreading.exercise.entity.Parkinglot;
import cn.wgoodq.study.MultiThreading.exercise.entity.ParkinglotUser;

/**
 * Created by OuKyou on 2017/1/21.
 */
public class ParkinglotDemo {
    public static void main(String[] args) {
        Parkinglot parkinglot = new Parkinglot();

        ParkinglotUser user1 = new ParkinglotUser("user1", parkinglot, true);
        ParkinglotUser user2 = new ParkinglotUser("user2", parkinglot, true);
        ParkinglotUser user3 = new ParkinglotUser("user3", parkinglot, true);
        ParkinglotUser user4 = new ParkinglotUser("user4", parkinglot, true);
        ParkinglotUser user5 = new ParkinglotUser("user5", parkinglot, true);
        ParkinglotUser user6 = new ParkinglotUser("user6", parkinglot, false);

        Thread thread1 = new Thread(user1);
        Thread thread2 = new Thread(user2);
        Thread thread3 = new Thread(user3);
        Thread thread4 = new Thread(user4);
        Thread thread5 = new Thread(user5);
        Thread thread6 = new Thread(user6);

        thread1.start();
        thread2.start();
//        thread3.start();
//        thread4.start();
//        thread5.start();
        thread6.start();

    }
}
